package com.xingchi.tornado.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import java.io.Serializable;

/**
 * 查询参数
 *
 * @author xingchi
 * @date 2023/6/10 21:14
 * @modified xingchi
 */
@Data
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class PaginationQuery implements Serializable {

    /**
     * 当前页码
     */
    @Builder.Default
    private int pageNum = 1;

    /**
     * 每页记录数
     */
    @Builder.Default
    private int pageSize = 20;

    /**
     * 是否分页
     */
    @Builder.Default
    private boolean isPagination = true;

    /**
     * 偏移量
     */
    @JsonIgnore
    @Builder.Default
    private int offset = 0;

}
